#include <iostream>

// 图形类定义
class Circle {
public:
    void draw() const { std::cout << "Drawing Circle\n"; }
};

class Rectangle {
public:
    void draw() const { std::cout << "Drawing Rectangle\n"; }
};

// 函数重载示例
void render(const Circle& circle) {
    std::cout << "Rendering Circle\n";
    circle.draw();
}

void render(const Rectangle& rectangle) {
    std::cout << "Rendering Rectangle\n";
    rectangle.draw();
}

// 模板函数，用于处理可以绘制的任何对象
template<typename T>
void renderAny(T&& drawable) {
    std::cout << "Rendering using template function\n";
    drawable.draw();
}

int main() {
    Circle circle;
    Rectangle rectangle;

    render(circle);
    render(rectangle);

    // 使用模板函数
    renderAny(circle);
    renderAny(rectangle);

    return 0;
}